package com.eptok.db;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

import org.logicalcobwebs.proxool.ProxoolException;
import org.logicalcobwebs.proxool.ProxoolFacade;
import org.logicalcobwebs.proxool.configuration.JAXPConfigurator;

public class DBManager {

	public static void initiation() throws ProxoolException {
		JAXPConfigurator.configure("cfg/proxool.xml", false);
	}

	public static Connection getUnicomConnection() throws SQLException {
		return DriverManager.getConnection("proxool.unicom");
	}

	public static Connection getBossConnection() throws SQLException {
		return DriverManager.getConnection("proxool.boss");
	}

	public static void close() throws SQLException {
		ProxoolFacade.shutdown(0);
	}

}
